The present invention generally relates to a paging type virtual storage computer system for executing a multiprogram, including an operating system program (abbreviated as OS), a resident program group and a non-resident program group. The invention relates more particularly to a method and apparatus of managing a main memory under the direction of the OS when the main memory is dynamically allocated to or released from programs in the computer system.
As shown in U.S. Pat. No. 4,811,216 and JP-A-61-54548, a main memory managing method in a multiprogram system has hitherto been known, wherein a main memory is logically divided into an area for storing an OS and a resident program group and an area for storing a non-resident program group, and upon execution of a program, the main memory is accessed in only an area associated with that program under the control of the OS. With this prior art method, even in the event that, for example, a non-resident program goes into a runaway condition to cause the main memory to be used to a great extent, this merely results in an abnormal ending of the non-resident program, and had no influence upon the operation of the OS and the resident program group. JP-A-62-177644 discloses another known method, according to which a bank memory (auxiliary memory) accessible directly from a processor is provided and the execution area is shared by storing an OS and resident programs in a main memory and by storing non-resident programs in the bank memory. With the latter method, resident programs are stored in the main memory and non-resident programs are stored in the bank memory, whereby the resident programs can be executed using the main memory alone and the non-resident programs can be executed using the bank memory alone,. Therefore, for example, when it is desired to enlarge the execution area of the non-resident programs, the enlargement can be done by merely providing an additional bank memory, with the result that the main memory, i.e., the execution area of the OS and resident programs, will not be oppressed, thereby facilitating function/performance extension of a terminal system to which this latter method is applied.
Disadvantageously, the aforementioned method of JP-A-6154548 does not take into account distinct separation of the main memory used by the OS and resident program group. In enlarging the input/output unit or extending the function of the OS, the capacity to be used by the OS is sometimes increased. In such an event, an increase in the capacity of main memory used by the OS causes the main memory to come short of idle capacity during online operation of the computer system, giving rise to a possibility that the resident programs may be forced to operate abnormally. The method of JP-A-62-177644 suffers from the same problem as that encountered in the aforementioned JP-A-61-54548 and besides, it requires the bank memory and the hardware which is adapted to transfer the control to the non-resident program loaded in the bank memory and fails to take into account the storing of resident and non-resident programs in the main memory, raising a problem that this prior art method cannot be applied to a computer system without the aforementioned hardware.